<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Player Management</title>
</head>
<body>
<h2>Player Management</h2>
<h3>Add new player</h3>
<form action="TennisServlet" method="get">
<input type="hidden" name="action" value="create" />
Firstname: <input type="text" name="firstname" maxlength="50" />
Lastname: <input type="text" name="lastname" maxlength="50" />
Birthdate <input type="text" name="birthdate" maxlength="10" />(DD-MM-yyyy)
<input type="submit"/>
</form>

<h3>Player list</h3>
<table>
<tr>
	<td>Id</td>
	<td>Firstname</td>
	<td>Lastname</td>
	<td>Birthdate</td>
	<td></td>
</tr>

<c:forEach var="player" items="${playerlist}">
<tr>
	<td>${player.id}</td>
	<td>${player.firstname}</td>
	<td>${player.lastname}</td>
	<td>${player.birthdate}</td>
	<td><a href="TennisServlet?action=delete&id=${player.id}">delete</a></td>
</tr>
</c:forEach>
</table>

</body>
</html>